<template>
  <div class="keyVideo">
    <div class="title">
      <stitle :bg="bg" text="重点视频" />
    </div>
    <div class="videoList">
      <div
        class="vlist-item"
        v-for="(item, index) in state.keyVideoList"
        :key="index"
      >
        <LivePlayer
          :videoUrl="item"
          fluent
          autoplay
          stretch
          live
          aspect="fullscreen"
        ></LivePlayer>
      </div>
    </div>
  </div>
</template>

<script>
import stitle from "@/components/common/stitle";
import LivePlayer from "@liveqing/liveplayer";
import store from "@/utils/store";
export default {
  name: "keyVideo",
  components: {
    stitle,
    LivePlayer,
  },
  data() {
    return {
      bg: require("@/assets/images/DispatchCommand/videoSurveill.png"),
      state: store.state,
    };
  },
  mounted() {
    store.setKeyVideoListAction(["", "", "", "", "", ""]);
  }
};
</script>

<style lang="scss" scoped>
.keyVideo {
  position: absolute;
  width: 96%;
  left: 2%;
  top: 830px;
  z-index: 999;
  .title {
    width: 400px;
  }
  .videoList {
    width: 90%;
    display: flex;
    margin: auto;
    justify-content: space-between;
    .vlist-item {
      width: 265px;
      height: 160px;
      background: rgba(255, 255, 255, 0);
      border: 2px solid #305383;
      border-radius: 3px;
      position: relative;
      .player-wrapper /deep/ .video-js .vjs-tech {
        object-fit: fill;
      }
      .player-wrapper /deep/ .video-inner {
        padding: 3px;
        box-sizing: border-box;
      }
      .player-wrapper /deep/ .vjs-poster {
        background-size: cover;
      }
    }
  }
}
</style>
 